mui.init({
	swipeBack:true //启用右滑关闭功能
});
mui.plusReady(function(){
	var status=plus.webview.currentWebview().status;
	if(status=="1"){
		document.querySelector("#no_problem").classList.remove("mui-hidden");
		document.querySelector("#wrap_all").classList.add("mui-hidden");
	}
})
//初始化滚动条
mui('.mui-scroll-wrapper').scroll({
	indicators: true
});
//列表点击
mui(".mui-content").on("tap",".mui-table-view-cell",function(){
	var status=this.getAttribute("status");
	var iid,uurl;
	if (status == "1" || status == "2") {
	    
		iid = "problem_detail.html";
		uurl = "problem_detail.html";

	}else if(status=="3"){
		iid = "problem_detail_rectified.html";
		uurl = "problem_detail_rectified.html";
	}else if(status=="4"){
		iid = "problem_detail_over.html";
		uurl = "problem_detail_over.html";
	}else{
		console.log("问题没有符合条件的状态")
	}
	location.href = uurl;
	return;
	mui.openWindow({
		'id': iid,
		'url': uurl,
			'extras': {extras:status},
//					'createNew': createNew,
		'show': {
			'aniShow': "slide-in-right"
		},
		'waiting': {
			autoShow: false
		}
	})
})

//首页
mui(".mui-bar").on("tap", "a", function () {
    location.href = "home.html";
});

//新增问题 
mui(".mui-content").on("tap", "#add_problem", function () {
    location.href = "unit_housing_problem_new.html";
    return;
	mui.openWindow({
		'id': "unit_housing_problem_new.html",
		'url': "unit_housing_problem_new.html",
			'extras': "",
//					'createNew': createNew,
		'show': {
			'aniShow': "slide-in-right"
		},
		'waiting': {
			autoShow: false
		}
	})
})